package li.com.ruiji.common;

// ThreadLocal是基于线程的储存空间，每个线程都是独立的
// 所以储存多个不会混淆


// 基于ThreadLocal封装的工具类
public class MyBaseContext {
    private static ThreadLocal<Long> threadLocal=new ThreadLocal<>();
    public static void setLongId(Long id){
        threadLocal.set(id);
    }
    public static Long getLongId(){
        return threadLocal.get();
    }

}
